
public class Pingfen {
	private int no;
	private String name;
	private static float grade;
	public Pingfen(){
		
	}
	public Pingfen(int no,String name){
		this.no=no;
		this.name=name;
	}
	
	public int getNo() {
		return no;
	}
	public void setNo(int no) {
		this.no = no;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public static float grade(int []score) {
		int sum=0;
		for(int i=0;i<score.length;i++){
			sum+=score[i];
	}
		sum=sum-max(score)-min(score);
		grade=(float)sum/(score.length-2);
		return grade;
	}
	public static int max(int []score){
		int max=score[0];
		for(int i=0;i<score.length;i++){
			if(max<score[i]){
				max=score[i];
			}
		}
		return max;
	} 
	public static  int min(int []score){
		
	   int min=score[0];
		for(int i=0;i<score.length;i++){
			if(min>score[i]){
				min=score[i];
			}
		}
		return min;
	}
	  
}
